#coding: utf-8


from twisted.internet import wxreactor
wxreactor.install()
from twisted.internet import reactor
import wx

from gui import userform
from server import vuser

     
class VehicleHunterApp(wx.App):
    def OnInit(self):
        connector = vuser.UserConnector(userform)
        connector.connect('127.0.0.1', 14556)
        self.form = userform.MainForm(connector)
        return True
    
    def MainLoop(self):
        self.form.Show(True)
        self.form.Maximize()
        wx.App.MainLoop(self)
        
if __name__ == '__main__':
    app = VehicleHunterApp(0)
    reactor.registerWxApp(app)
    reactor.run()
    
    